/*
 *  Copyright (c) 2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
 *
 *  This program and the accompanying materials are made available under the
 *  terms of the Apache License, Version 2.0 which is available at
 *  https://www.apache.org/licenses/LICENSE-2.0
 *
 *  SPDX-License-Identifier: Apache-2.0
 *
 *  Contributors:
 *       Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation
 *
 */

package org.eclipse.edc.http.spi;

import okhttp3.Request;
import org.eclipse.edc.spi.result.ServiceResult;

/**
 * Http client that provides a way to communicate over the "control" api
 */
public interface ControlApiHttpClient {

    /**
     * Execute a http request without returning the response body.
     *
     * @param requestBuilder the request builder.
     * @return a service result.
     */
    ServiceResult<Void> execute(Request.Builder requestBuilder);

    /**
     * Execute a http request and return the response body.
     *
     * @param requestBuilder the request builder.
     * @return a service result.
     */
    ServiceResult<String> request(Request.Builder requestBuilder);

}
